SOUND_TABLE = {
    0x004F: "wind_gust_stopping",
    0x0050: "blizzard",
    0x005A: "Item",
    0x005B: "Level Up",
    0x005C: "ItemBreak",
    0x0060: "Save",
    0x0061: "menu_select",
    0x0065: "map_cursor_moved",
    0x0066: "Select 6",
    0x0067: "TradeRight",
    0x0068: "Select 2",
    0x0069: "Select 3",
    0x006A: "Select 1",
    0x006B: "Select 4",
    0x006C: "Error",
    0x006D: "savemenu_pressed_start_title",
    0x006E: "savemenu_move_cursor",
    0x006F: "savemenu_swipe",
    0x0070: "Info In",
    0x0071: "Info Out",
    0x0072: "savemenu_can_not_be_selected",
    0x0073: "Next Turn",
    0x0075: "HP_Recovery",
    0x0076: "stat_increase",
    0x0077: "menu_select_1",
    0x0078: "Map In",
    0x0079: "Map Out",
    0x007A: "menu_can_not_be_selected",
    0x007B: "system_error_warning",
    0x007C: "menu_show",
    0x007D: "unknown",
    0x007E: "menu_show_1",
    0x007F: "system_error_warning_1",
    0x0080: "link_arena_sfx",
    0x0082: "rest_staff_map",
    0x0083: "silence_staff_map",
    0x0084: "silence_staff_strikemap",
    0x0085: "sleep_staff_map",
    0x0086: "hammerne_staff_map",
    0x0087: "berserk_staff_map",
    0x0088: "barrier_staff_map",
    0x0089: "Heal1",
    0x008A: "Mend",
    0x008B: "Recover",
    0x008C: "reserve_staff",
    0x008D: "UnlockStaff",
    0x0090: "fe6_chapter_opening_humming",
    0x0096: "Map_Step_Infantry2",
    0x0097: "Map_Step_Infantry1",
    0x0098: "Map_Step_Infantry1",
    0x0099: "Map_Step_Infantry2",
    0x009A: "footsteps_5",
    0x009B: "Map_Step_Mounted2",
    0x009C: "Map_Step_Mounted3",
    0x009D: "Map_Step_Mounted1",
    0x009E: "Map_Step_Mounted2",
    0x009F: "Map_Step_Mounted3",
    0x00A0: "armour_walk",
    0x00A1: "armour_walk_2",
    0x00A2: "Map_Step_Armor1",
    0x00A3: "Map_Step_Armor2",
    0x00A4: "Map_Step_Armor1",
    0x00A5: "Map_Step_Armor1",
    0x00A6: "Map_Step_Flier",
    0x00A7: "Map_Step_Flier",
    0x00AA: "DebuffRecover",
    0x00AB: "VillageDestroyed",
    0x00AC: "captive_falling_from_dead_holder",
    0x00AF: "Wall Attack",
    0x00B0: "attacking_wall_snag",
    0x00B1: "Unlock",
    0x00B3: "Torch",
    0x00B4: "Warp",
    0x00B5: "WarpEnd",
    0x00B6: "PureWater",
    0x00B7: "Poison",
    0x00B8: "ui_or_status-related_sound_effect",
    0x00B9: "GoldExchange",
    0x00BA: "poison_event",
    0x00BC: "vertical_arrow_trap",
    0x00BD: "water_tile_going_under",
    0x00BE: "water_tile_coming_up",
    0x00BF: "fire_tile",
    0x00C8: "Throw 2",
    0x00C9: "Throw 3",
    0x00CA: "Throw 1",
    0x00CB: "eliwood_critical_sword_swing",
    0x00CC: "tap",
    0x00CD: "low_plunk",
    0x00CE: "Unsheathe",
    0x00CF: "Sheathe",
    0x00D0: "ballista_fire",
    0x00D1: "creaking",
    0x00D2: "Attack Hit 5",
    0x00D3: "Attack Hit 3",
    0x00D4: "Attack Hit 2",
    0x00D5: "Final Hit",
    0x00D6: "Death",
    0x00D7: "Miss",
    0x00D8: "Critical Hit 1",
    0x00DC: "mamkute_transform",
    0x00DD: "mamkute_de-transform",
    0x00DE: "mamkute_yowl",
    0x00E2: "armour_triangle_allies_striking",
    0x00E5: "idoun_fire_dragon_death_roar",
    0x00E7: "Battle Cry",
    0x00EA: "Axe Push",
    0x00EB: "Axe Pull",
    0x00EF: "Dance2",
    0x00F0: "Legendary Weapon",
    0x00F1: "FireCharge",
    0x00F2: "FireBall",
    0x00F4: 'bolting_static',
    0x00F5: 'bolting_strike',
    0x00F6: "ShamanRune",
    0x00F7: "FireHit",
    0x00F8: "ElfireHit",
    0x00F9: "Berserk",
    0x00FA: "Silence1",
    0x00FB: "Silence2",
    0x00FC: "SilenceCrack",
    0x00FD: "Restore",
    0x00FE: "Purge1",
    0x00FF: "Purge2",
    0x0100: "Purge3",
    0x0101: "Purge4",
    0x0102: "Barrier",
    0x0103: "Hammerne",
    0x010A: "Flux1",
    0x010E: "Heal2",
    0x010F: "live_staff_on_map",
    0x0110: "Mend",
    0x0111: "Mend",
    0x0112: "Recover",
    0x0113: "Recover",
    0x0114: "Fortify",
    0x0119: "Bolting1",
    0x011A: "Bolting2",
    0x011B: "Sleep1",
    0x011C: "Sleep2",
    0x011D: "rumbling",
    0x011F: "weird_charging_sound",
    0x0120: "Lightning1",
    0x0121: "Lightning2",
    0x0122: "Fimbulvetr1",
    0x0123: "Fimbulvetr2",
    0x0124: "Nosferatu1",
    0x0125: "Nosferatu2",
    0x0126: "Nosferatu3",
    0x0127: "Divine1",
    0x0128: "Divine2",
    0x0129: "Divine3",
    0x0130: "Fenrir1",
    0x0131: "Fenrir2",
    0x0132: "Fenrir3",
    0x0133: "Fenrir4",
    0x0134: "ValkyrieCharge",
    0x0135: "SageRune",
    0x0136: "ballista_arrow",
    0x0137: "ballista_arrow_falling",
    0x0138: "Eclipse1",
    0x0139: "Eclipse2",
    0x013B: "Promotion1",
    0x013C: "Promotion2",
    0x013D: "Promotion3",
    0x013E: "PromotionCrackle",
    0x013F: "DemonKingEntrance",
    0x0140: "DemonKingLightning",
    0x0141: "DemonKingRoar",
    0x0142: "dying_demon_king",
    0x0147: "single_lightning_strike_promotion_bolting",
    0x014A: "play_quick_heavy_step_sfe",
    0x014E: "soft_step",
    0x014F: "Step Back 1",
    0x0150: "General Step",
    0x0151: "General Step",
    0x0154: "Step Back 1",
    0x0155: "soft_step_2_1",
    0x0156: "soft_step_3_1",
    0x0157: "soft_step_4_1",
    0x0158: "soft_step_5",
    0x0159: "soft_steps",
    0x015A: "play_quick_heavy_step_sfe_1",
    0x0262: "Heavy Wing Flap",
    0x0263: "Heavy Wing Flap",
    0x0264: "Long Wing Flap",
    0x0265: "Long Wing Flap",
    0x0266: "Armor Shift",
    0x0267: "Armor Shift",
    0x0268: "moving_sound_of_pegasus_during_triangle_attack",
    0x0269: "BrightFlash",
    0x026B: "unknown_1",
    0x026C: "unknown_1_2",
    0x02BC: "Shine",
    0x02BD: "Luna1",
    0x02BE: "Luna2",
    0x02BF: "WindWave",
    0x02C0: "Aircalibur",
    0x02C1: "Aura1",
    0x02C2: "Aura2",
    0x02C3: "Aura3",
    0x02C7: "Gespenst1",
    0x02C8: "Gespenst2",
    0x02C9: "Gespenst3",
    0x02CC: "HealInit",
    0x02CD: "Level_Up_Level",
    0x02CE: "No Damage",
    0x02CF: "weird_pat_sound",
    0x02D0: "eliwoods_sword_shining",
    0x02D2: "weird_flaming_sound",
    0x02D3: "Dance1",
    0x02D5: "dancing_map",
    0x02D6: "playing_map",
    0x02D7: "snag_falling",
    0x02D8: "weird_charging_sound_1",
    0x02D9: "thud",
    0x02DA: "sword_unsheathing_1",
    0x02DD: "glittery_sound",
    0x02E0: "weird_rumbling",
    0x02E1: "eclipse_striking",
    0x02E2: "Eclipse3",
    0x02E4: "summoner_crit_sound",
    0x02E5: "text_advancing_text_displayed_on_brown_scroll_tablet",
    0x02E6: "short_noise-based_sfx",
    0x02E7: "short_noise-based_sfx_lower",
    0x02E9: "magic_shine",
    0x02EA: "magic_shine_long",
    0x02EB: "magic_shine_longer",
    0x02EC: "magic_shine_even_longer",
    0x02ED: "magic_shine_longest",
    0x02F0: "rumbling_at_the_dragons_gate",
    0x02F1: "dragons_screaming",
    0x02F2: "fire_dragon_dying",
    0x02F3: "fire_dragon_dying_2",
    0x02F4: "no_damage_1",
    0x02F5: "high-pitched_dragon_yell",
    0x02F7: "DruidCrit",
    0x02F8: "SageCrit",
    0x02F9: "swish_sound",
    0x02FB: "fire_dragon_attacking",
    0x02FC: "dragons_attacking_athos",
    0x0302: "Map_Step_Zombie",
    0x0303: "Map_Step_Zombie",
    0x0304: "Map_Step_Skeleton",
    0x0305: "Map_Step_Skeleton",
    0x0306: "Map_Step_Mogall",
    0x0307: "Map_Step_Mogall",
    0x0308: "Map_Step_Bael",
    0x0309: "Map_Step_Bael",
    0x030A: "Map_Step_Tarvos",
    0x030B: "Map_Step_Tarvos",
    0x030C: "Map_Step_Gorgon",
    0x030D: "Map_Step_Gorgon",
    0x030E: "world_map_move_by_ship_1",
    0x030F: "world_map_move_by_ship_2",
    0x0310: "world_map_draw_road",
    0x0311: "world_map_destinations_appearing",
    0x0312: "enemy_appears_on_world_map",
    0x0313: "clashing_weapons_when_world_map_skirmish_started",
    0x0314: "when_the_word_skirmish_appears",
    0x0316: "Intro",
    0x0317: "game_opening_title_se",
    0x0320: "ZombieWindup",
    0x0321: "ZombieHit",
    0x0322: "ZombieCrit",
    0x0325: "BaelHit",
    0x0326: "BaelWindup",
    0x0327: "BaelCrit",
    0x0329: "CyclopsBattleCry",
    0x032A: "MautheDoogGrowl",
    0x032B: "MautheDoogBite",
    0x032C: "MautheDoogHowl",
    0x032E: "GargoyleBattleCry",
    0x032F: "GorgonMagic2",
    0x0330: "GorgonMagic3",
    0x0331: "GorgonScream",
    0x0332: "GargoyleLaugh",
    0x037A: "burn_boom_sfe",
    0x037B: "dragon_roar",
    0x037C: "mage_knight_magic_sound",
    0x037D: "SkeletonCrit",
    0x037E: "charging_sound",
    0x037F: "mage_knight_crit_sound_similar_to_shaman",
    0x0380: "dragon_roar_with_wind_on_bg",
    0x0384: "dark_magic_one_of_the_monster_spells",
    0x0385: "special_for_mag",
    0x03AC: "Gleipnir",
    0x03AD: "GleipnirHit",
    0x03AF: "Naglfar",
    0x03B0: "NaglfarHit",
    0x03B2: "DemonLight",
    0x03B3: "DemonLightHit",
    0x03B5: "excalibur_wind_clouds",
    0x03B6: "DemonSurge",
    0x03B7: "GorgonMagic1",
    0x03B8: "Stone",
    0x03B9: "StoneHit",
    0x03BA: "stone_map_sfx",
    0x03BB: "manakete_myrrh_step",
    0x03BC: "ch18_someones_ftep",
    0x03BD: "unknown_1_2_3",
    0x03BE: "unknown_1_2_3_4",
    0x03BF: "Summon",
    0x03C0: "MogallHit1",
    0x03C2: "MogallHit2",
    0x03C3: "MogallCrit1",
    0x03C4: "MogallCrit2",
    0x03C6: "EvilEye",
    0x03C7: "CrimsonEye",
    0x03C9: "egg_grow",
    0x03CA: "egg_birth",
    0x03CF: "unknown_1_2_3_4_5",
    0x03D0: "unknown_1_2_3_4_5_6",
    0x03D1: "SkillActivate",
    0x03D2: "unknown_1_2_3_4_5_6_7",
    0x03D3: "Ivaldi1",
    0x03D4: "Ivaldi2",
    0x03D5: "Shadowshot",
    0x03D6: "ShadowshotHit",
    0x03E5: "using_promotion_se1",
    0x03E6: "using_promotion_se2_maybe",
}

if __name__ == '__main__':
    import glob, os
    default_lt_proj = './default.ltproj/resources/sfx/*'
    default_sounds = [os.path.split(fn)[-1][:-4] for fn in glob.glob(default_lt_proj)]
    print(default_sounds)
    counter = 0
    for sound in SOUND_TABLE.values():
        if sound not in default_sounds:
            print(f'{sound} not in default ltproj!')
            counter += 1
    print(f"Missing {counter / len(SOUND_TABLE) * 100:0.2f}% of SOUND TABLE sounds")
